package com.msb.common.exception;


import lombok.Getter;

/**
 * 错误编码和错误信息的枚举
 * 10:通用
 * 11：商品
 * 12：订单
 * 13：购物车
 * 14：物流
 * 15:会员
 */
@Getter
public enum BizCodeEnum {

    UNKNOWN_EXCEPTION(10000,"系统未知错误"),
    VALID_EXCEPTION(10001,"参数格式异常"),
    VALID_SMS_EXCEPTION(10002,"短信发送频率太高，请稍等再发送"),
    PRODUCT_UP_EXCEPTION(11001,"商品上架异常"),




    USER_NAME_EXIST_EXCEPTION(15001,"用户名已存在"),

    NO_STOCK_EXCEPTION(14001,"商品锁定库存失败"),
    PHONE_EXIST_EXCEPTION(15002,"手机号已存在"),
    PHONE_NOT_NAME_EXIST_EXCEPTION(15003,"账号或者密码错误")
    ;
    private int code;
    private String msg;

    BizCodeEnum(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

}
